<%--
  Created by IntelliJ IDEA.
  User: pp
  Date: 2020/10/12
  Time: 17:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录界面</title>


    <%--导入easyui核心的css--%>
    <link rel="stylesheet" href="easyui/themes/default/easyui.css">
    <%--导入easyui图标及css--%>
    <link rel="stylesheet" href="easyui/themes/icon.css">
    <%--导入基本默认css样式--%>
    <link rel="stylesheet" href="easyui/themes/demo.css">
    <%--导入jq依赖的js文件--%>
    <script type="text/javascript" src="easyui/jquery.min.js"></script>
    <%--导入easyui核心js--%>
    <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>

    <script type="text/javascript">
        $(function () {
            $("#btn").click(function () {
                if ($("#sid").val()==""||$("#sid").val()==null){

                    $.messager.alert('警告','账号不能为空','info');
                }else if ($("#pswd").val()==""||$("#pswd").val()==null){
                    $.messager.alert('警告','密码不能为空','info');
                }else {
                    $.post("admin/selectAdminController",$("#fm").serialize(),function (result) {
                        if (result){
                            window.location.href="main.jsp";
                        }else {
                            $.messager.alert('警告','登录失败','error');
                        }
                    })

                }
            })
        })


    </script>
</head>
<body>

<div style="margin-top: 160px; margin-left: 450px">
    <div id="p" class="easyui-panel" style="width:500px;height:400px;padding:10px;"
         title="登录" iconCls="icon-save" collapsible="true" data-options="iconCls:'icon-save',closable:true,collapsible:true,minimizable:true,maximizable:true">

        <form id="fm">
            <div style="margin-top: 72px;margin-left: 133px">
                <input id="sid" name="aname" type="text" class="easyui-textbox" style="width:200px" prompt="用户账号">
            </div>
            <div style="margin-top: 16px;margin-left: 133px">
                <input id="pswd" name="apwd" class="easyui-passwordbox" prompt="用户密码" style="width:200px;height:34px;padding:10px">
            </div>
            <div style="margin-top: 10px;margin-left: 195px">
                <a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">登录</a>
            </div>
        </form>


    </div>
</div>



</body>
</html>
